﻿function InsertEmailFromURL()
{
    var sharpsymbol = window.location.href.indexOf('#');
    if(sharpsymbol > 0)
    {
        var newemails = window.location.href.substring(sharpsymbol + 1);
        if(newemails.length > 0)
        {   
        if(document.getElementById('texta_email').value!="")
          {
            document.getElementById('texta_email').value +=","+ newemails;
          }
        else
         {
           document.getElementById('texta_email').value +=newemails; 
         }
            location.href =window.location.href.substring(0,sharpsymbol + 1);           
        }
    }
}
function Send()
{ 
$('MessagesBox').style.display='none';   
if($('texta_email').value==""){return}
var  emails=$('texta_email').value;
emails = emails.replace(/，/gi,",").toString(); 
    WebServices.My.SenLinkMan("",emails,memberno,rname);
 $('MessagesBox').style.display=''; 
 $('texta_email').value="";    
}
function CopyText(id)
{
    copy(document.getElementById(id).value);
}
function copy(text2copy) 
{
    if (window.clipboardData) 
    {   
        window.clipboardData.setData("Text",text2copy);   
    } 
    else 
    {   
        var flashcopier = 'flashcopier';
        if(!document.getElementById(flashcopier)) 
        {
            var divholder = document.createElement('div');
            divholder.id = flashcopier;
            document.body.appendChild(divholder);
        }
        document.getElementById(flashcopier).innerHTML = '';
        var divinfo = '<embed src="/images/_clipboard.swf" FlashVars="clipboard='+escape(text2copy)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';
        document.getElementById(flashcopier).innerHTML = divinfo;
    }
}